//=============================================================================
//D Simple template that is defined in one file and implemented in a second
//
// ----------------------------------------------------------------------------
// Copyright 2013 Delcam plc., Birmingham, UK
// ----------------------------------------------------------------------------
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 18/06/13 Written.
//-----------------------------------------------------------------------------
#include "stdafx.h"

#include "cpp/cppTemplates1.h"

// additional includes from 'cpp' library
#include "play_headers/template1.h"
// includes from PowerINSPECT libraries
// includes from Delcam libraries
#include "utils/ut_assert.h"   // Use assertions!
// includes from other libraries
// system includes

// types: classes, enums, typedefs

// variables: consts, statics, exported variables (declared extern elsewhere)
// local forward function declarations

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


//=============================================================================
cppTemplates1::cppTemplates1()
  : m_floats(12.3f,"%f\r\n")
//
//D Default constructor.
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 18/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;
}

//=============================================================================
cppTemplates1::~cppTemplates1()
//
//D Destructor.
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 18/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;
}
 extern template class __declspec(dllimport)  T1<int>;
//=============================================================================
void cppTemplates1::run()
//
//D Details of the function.
//
// History.
// DICC   Who When     What   
// ------ --- -------- --------------------------------------------------------
// 999999 CLH 18/06/13 Written.
//-----------------------------------------------------------------------------
{
  UT_CHECKVALID_CLASS;


  T1<int> t1(1, "Int %d\r\n");

  t1.print();

  T1<double> t2(1.12, "Dbl %f\r\n");

  t2.print();
}
